local skel = fk.CreateSkill {
  name = "efengqi__xunxun",
}

Fk:loadTranslationTable{
  ["efengqi__xunxun"] = "恂恂",
  [":efengqi__xunxun"] = "每回合限一次，手牌数与你相同的角色摸牌时，其可以令你卜算4。",
  ["#efengqi__xunxun-invoke"] = "恂恂：你可以令 %src 卜算4张牌。",

  ["$efengqi__xunxun1"] = "众将死战，非我之功。",
  ["$efengqi__xunxun2"] = "爱兵如子，胜乃可全。",
}

skel:addEffect(fk.BeforeDrawCard, {
  anim_type = "control",
  times = function (_, player)
    return 1 - player:usedSkillTimes(skel.name, Player.HistoryTurn)
  end,
  can_trigger = function(self, event, target, player, data)
    return target:getHandcardNum() == player:getHandcardNum() and player:hasSkill(skel.name)
    and player:usedSkillTimes(skel.name, Player.HistoryTurn) == 0
  end,
  on_cost = function (self, event, target, player, data)
    return player.room:askToSkillInvoke(target, { skill_name = skel.name, prompt = "#efengqi__xunxun-invoke:"..player.id })
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:askToGuanxing(player, { cards = room:getNCards(4), skill_name = skel.name})
  end,
})

return skel
